package com.cskaoyan.bean.vo.wx_catalog_current;



import com.cskaoyan.bean.po.MarketCategory;
import com.cskaoyan.bean.po.MarketGoods;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author Trellis
 * @since 2022/09/08 17:45
 */
public class WxCatalogCurrentVo {


    /**
     * currentCategory : {"picUrl":"http://yanxuan.nosdn.127.net/3708dbcb35ad5abf9e001500f73db615.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L1","sortOrder":3,"name":"餐厨","pid":0,"updateTime":"2018-02-01 00:00:00","id":1005001,"iconUrl":"http://yanxuan.nosdn.127.net/ad8b00d084cb7d0958998edb5fee9c0a.png","desc":"爱，囿于厨房"}
     * currentSubCategory : [{"picUrl":"http://yanxuan.nosdn.127.net/fb670ff3511182833e5b035275e4ac09.png","deleted":false,"keywords":"fff","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":9,"name":"饮食","pid":1005001,"updateTime":"2022-09-07 16:37:12","id":1005002,"iconUrl":"http://yanxuan.nosdn.127.net/c9280327a3fd2374c000f6bf52dff6eb.png","desc":"好吃，高颜值美食 "},{"picUrl":"http://yanxuan.nosdn.127.net/d2db0d1d0622c621a8aa5a7c06b0fc6d.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":1,"name":"锅具","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1005007,"iconUrl":"http://yanxuan.nosdn.127.net/4aab4598017b5749e3b63309d25e9f6b.png","desc":"一口好锅，炖煮生活一日三餐"},{"picUrl":"http://yanxuan.nosdn.127.net/695ed861a63d8c0fc51a51f42a5a993b.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":4,"name":"餐具","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1005008,"iconUrl":"http://yanxuan.nosdn.127.net/f109afbb7e7a00c243c1da29991a5aa3.png","desc":"餐桌上的舞蹈"},{"picUrl":"http://yanxuan.nosdn.127.net/3a40faaef0a52627357d98ceed7a3c45.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":9,"name":"清洁","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1005009,"iconUrl":"http://yanxuan.nosdn.127.net/e8b67fe8b8db2ecc2e126a0aa631def0.png","desc":"环保便利，聪明之选"},{"picUrl":"http://yanxuan.nosdn.127.net/ec53828a3814171079178a59fb2593da.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":2,"name":"杯壶","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1007000,"iconUrl":"http://yanxuan.nosdn.127.net/0b244d3575b737c8f0ed7e84c5c4abd2.png","desc":"精工生产制作，匠人手艺"},{"picUrl":"http://yanxuan.nosdn.127.net/04cd632e1589adcc4345e40e8ad75d2b.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":6,"name":"清洁保鲜","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1008011,"iconUrl":"http://yanxuan.nosdn.127.net/dc4d6c35b9f4abb42d2eeaf345710589.png","desc":"真空保鲜，美味不限时"},{"picUrl":"http://yanxuan.nosdn.127.net/5b94463017437467a93ae4af17c2ba4f.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":3,"name":"功能厨具","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1008012,"iconUrl":"http://yanxuan.nosdn.127.net/22db4ccbf52dc62c723ac83aa587812a.png","desc":"下厨省力小帮手"},{"picUrl":"http://yanxuan.nosdn.127.net/be3ba4056e274e311d1c23bd2931018d.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":5,"name":"茶具咖啡具","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1008013,"iconUrl":"http://yanxuan.nosdn.127.net/9ea192cd2719c8348f42ec17842ba763.png","desc":"先进工艺制造，功夫体验"},{"picUrl":"http://yanxuan.nosdn.127.net/555afbfe05dab48c1a3b90dcaf89b4f2.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":7,"name":"刀剪砧板","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1013005,"iconUrl":"http://yanxuan.nosdn.127.net/9d481ea4c2e9e6eda35aa720d407332e.png","desc":"传统工艺 源自中国刀城"},{"picUrl":"http://yanxuan.nosdn.127.net/c09d784ba592e4fadabbaef6b2e95a95.png","deleted":false,"keywords":"","addTime":"2018-02-01 00:00:00","level":"L2","sortOrder":8,"name":"厨房小电","pid":1005001,"updateTime":"2018-02-01 00:00:00","id":1023000,"iconUrl":"http://yanxuan.nosdn.127.net/521bd0c02d283b80ba49e73ca84df250.png","desc":"厨房里的省心小电器"}]
     */
    private CurrentCategoryEntity currentCategory;
    private List<CurrentSubCategoryEntity> currentSubCategory = new ArrayList<>();

    public void copyCurrentSubCategory(MarketGoods desc) {
        CurrentSubCategoryEntity entity = new CurrentSubCategoryEntity();
        BeanUtils.copyProperties(desc,entity);
        currentSubCategory.add(entity);
    }
    public void copyCurrentSubCategoryNew(MarketCategory marketCategory) {
        CurrentSubCategoryEntity entity = new CurrentSubCategoryEntity();
        BeanUtils.copyProperties(marketCategory,entity);
        currentSubCategory.add(entity);
    }

    public void copyCurrentCategory(MarketCategory desc) {
        CurrentCategoryEntity categoryEntity = new CurrentCategoryEntity();
        BeanUtils.copyProperties(desc,categoryEntity);
        currentCategory = categoryEntity;
    }



    public void setCurrentCategory(CurrentCategoryEntity currentCategory) {
        this.currentCategory = currentCategory;
    }

    public void setCurrentSubCategory(List<CurrentSubCategoryEntity> currentSubCategory) {
        this.currentSubCategory = currentSubCategory;
    }

    public CurrentCategoryEntity getCurrentCategory() {
        return currentCategory;
    }

    public List<CurrentSubCategoryEntity> getCurrentSubCategory() {
        return currentSubCategory;
    }

    public class CurrentCategoryEntity {
        /**
         * picUrl : http://yanxuan.nosdn.127.net/3708dbcb35ad5abf9e001500f73db615.png
         * deleted : false
         * keywords :
         * addTime : 2018-02-01 00:00:00
         * level : L1
         * sortOrder : 3
         * name : 餐厨
         * pid : 0
         * updateTime : 2018-02-01 00:00:00
         * id : 1005001
         * iconUrl : http://yanxuan.nosdn.127.net/ad8b00d084cb7d0958998edb5fee9c0a.png
         * desc : 爱，囿于厨房
         */
        private String picUrl;
        private boolean deleted;
        private String keywords;
        private Date addTime;
        private String level;
        private int sortOrder;
        private String name;
        private int pid;
        private Date updateTime;
        private int id;
        private String iconUrl;
        private String desc;

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }

        public void setDeleted(boolean deleted) {
            this.deleted = deleted;
        }

        public void setKeywords(String keywords) {
            this.keywords = keywords;
        }

        public void setAddTime(Date addTime) {
            this.addTime = addTime;
        }

        public void setLevel(String level) {
            this.level = level;
        }

        public void setSortOrder(int sortOrder) {
            this.sortOrder = sortOrder;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void setPid(int pid) {
            this.pid = pid;
        }

        public void setUpdateTime(Date updateTime) {
            this.updateTime = updateTime;
        }

        public void setId(int id) {
            this.id = id;
        }

        public void setIconUrl(String iconUrl) {
            this.iconUrl = iconUrl;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getPicUrl() {
            return picUrl;
        }

        public boolean isDeleted() {
            return deleted;
        }

        public String getKeywords() {
            return keywords;
        }

        public Date getAddTime() {
            return addTime;
        }

        public String getLevel() {
            return level;
        }

        public int getSortOrder() {
            return sortOrder;
        }

        public String getName() {
            return name;
        }

        public int getPid() {
            return pid;
        }

        public Date getUpdateTime() {
            return updateTime;
        }

        public int getId() {
            return id;
        }

        public String getIconUrl() {
            return iconUrl;
        }

        public String getDesc() {
            return desc;
        }
    }

    public class CurrentSubCategoryEntity {
        /**
         * picUrl : http://yanxuan.nosdn.127.net/fb670ff3511182833e5b035275e4ac09.png
         * deleted : false
         * keywords : fff
         * addTime : 2018-02-01 00:00:00
         * level : L2
         * sortOrder : 9
         * name : 饮食
         * pid : 1005001
         * updateTime : 2022-09-07 16:37:12
         * id : 1005002
         * iconUrl : http://yanxuan.nosdn.127.net/c9280327a3fd2374c000f6bf52dff6eb.png
         * desc : 好吃，高颜值美食
         */
        private String picUrl;
        private boolean deleted;
        private String keywords;
        private Date addTime;
        private String level;
        private int sortOrder;
        private String name;
        private int pid;
        private Date updateTime;
        private int id;
        private String iconUrl;
        private String desc;

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }

        public void setDeleted(boolean deleted) {
            this.deleted = deleted;
        }

        public void setKeywords(String keywords) {
            this.keywords = keywords;
        }

        public void setAddTime(Date addTime) {
            this.addTime = addTime;
        }

        public void setLevel(String level) {
            this.level = level;
        }

        public void setSortOrder(int sortOrder) {
            this.sortOrder = sortOrder;
        }

        public void setName(String name) {
            this.name = name;
        }

        public void setPid(int pid) {
            this.pid = pid;
        }

        public void setUpdateTime(Date updateTime) {
            this.updateTime = updateTime;
        }

        public void setId(int id) {
            this.id = id;
        }

        public void setIconUrl(String iconUrl) {
            this.iconUrl = iconUrl;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getPicUrl() {
            return picUrl;
        }

        public boolean isDeleted() {
            return deleted;
        }

        public String getKeywords() {
            return keywords;
        }

        public Date getAddTime() {
            return addTime;
        }

        public String getLevel() {
            return level;
        }

        public int getSortOrder() {
            return sortOrder;
        }

        public String getName() {
            return name;
        }

        public int getPid() {
            return pid;
        }

        public Date getUpdateTime() {
            return updateTime;
        }

        public int getId() {
            return id;
        }

        public String getIconUrl() {
            return iconUrl;
        }

        public String getDesc() {
            return desc;
        }
    }
}
